<!--河南星辰软件科技有限公司
@copyright Copyright (c) 2010~2022 All rights reserved.
-->
<template>
  <div class='app-container'>
    <el-row>
      <el-col :span='22' :xs='24'>
        <table cellpadding="0" cellspacing="0" border="0" width="100%">
          <tr>
            <td nowrap class="containerSubtabLabel"></td>
            <td width="100%" class="containerSubtabSpace">&nbsp;</td>
          </tr>
        </table>
        <table cellpadding="0" cellspacing="0" border="0" class="conSubs">
          <tr>
            <td class="conSubOn" nowrap><a href="gotoPage('/psi/product/ProductTask')">生产作业</a></td>
            <td class="conSubOff" nowrap><a href="gotoPage('/psi/product/ProductMonitor')">即时监控</a></td>
          </tr>
          <tr>
          </tr>
        </table>
        <el-form ref="form" :model="steps" :rules="rules" label-width="100px" id="mvcfm">
          <div class="form-unit">
            <span class="mvc-title-left"> 流程明细 </span>
          </div>
          <el-table :data="steps">
            <el-table-column label="步骤" prop="description">
            </el-table-column>
            <el-table-column label="工作人" prop="owner">
              <template slot-scope="scope">
                {{scope.row.owner}}
              </template>
            </el-table-column>
            <el-table-column label="任务" prop="openURL">
              <template slot-scope="scope">
              </template>
            </el-table-column>
            <el-table-column label="状态" prop="status">
            </el-table-column>
            <el-table-column label="完成日期" prop="end_date">
            </el-table-column>
          </el-table>
        </el-form>
        <el-menu-item v-for='item in Container1'>
          <el-link @click="gotoMenu(item.url)" :type="'生产作业'===item.name?'primary':'default'">{{item.page_desc||item.name}}</el-link>
        </el-menu-item>
      </el-col>
      <el-col :span='2' :xs='24'>
        <el-menu default-active='active' class='menu-unit'>
          <el-menu-item v-for='item in Container'>
            <el-link @click="gotoMenu(item.url)" :type="'文件审批'===item.name?'primary':'default'">{{item.page_desc||item.name}}</el-link>
          </el-menu-item>
        </el-menu>
      </el-col>
    </el-row>
  </div>
</template>
<script>
  import request from '@/utils/request'
  export default {
    name: 'ProductTask',
    components: {},
    props: ['popparams'],
    data() {
      return {
        vueparams: this.getVUEParams(""),
        steps: [],
        loading: false,
        Container: null,
        Container1: null,
        rules: {}
      }
    },
    created() {
      this.getData();
      this.loadContainerMenu({
        pid: "C1BDE411EFF7473EAF5F658AF81F2689",
        name: "产品目录右菜单",
        selected: "文件审批"
      }, 'Container', this.vueparams);
      this.loadContainerMenu({
        pid: "C1BDE411EFF7473EAF5F658AF81F2689",
        name: "工序流程菜单",
        selected: "生产作业"
      }, 'Container1', this.vueparams);
    },
    updated() {},
    mounted() {},
    methods: {
      getData() {
        request({
          method: 'get',
          url: '/xcapi/VUEAction/psi/product/ProductAction/productTask?' + this.vueparams,
        }).then(data => {
          for (var k in data) {
            if (Array.isArray(data[k])) {
              this[k] = data[k];
            } else {
              $.extend(this[k], data[k]);
            }
          }
        })
      },
    },
  }
</script>
